/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 修复用户下拉菜单显示问题 */
.dropdown-menu {
    z-index: 1030;
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

/* 页脚样式 */
footer {
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 卡片样式 */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: contain;
    padding: 10px;
}

/* 商品价格样式 */
.price {
    color: #f00;
    font-weight: bold;
    font-size: 1.1rem;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-left: 5px;
}

/* 按钮样式 */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* 轮播图样式 */
.carousel-item {
    height: 400px;
}

.carousel-item img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }
    
    .card-img-top {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        height: 200px;
    }
}

/* 分类侧边栏样式 */
.category-sidebar {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item > a {
    display: block;
    padding: 10px 15px;
    color: #333;
    font-size: 14px;
    transition: all 0.3s;
}

.category-item > a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.category-item > a i {
    margin-right: 5px;
    color: #555;
}

.subcategory-panel {
    position: absolute;
    top: 0;
    left: 100%;
    width: 800px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 4px 4px 0;
    padding: 20px;
    z-index: 1000;
    display: none;
}

.category-item:hover .subcategory-panel {
    display: block;
}

.subcategory-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.subcategory-title a {
    color: #333;
}

.subcategory-title a:hover {
    color: #007bff;
}

.product-type-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-type-list li {
    margin-bottom: 5px;
}

.product-type-list a {
    color: #666;
    font-size: 12px;
}

.product-type-list a:hover {
    color: #007bff;
}

.category-promo {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.category-promo h5 {
    font-size: 14px;
    margin-bottom: 15px;
    color: #333;
}

.promo-product {
    display: block;
    text-align: center;
}

.promo-product img {
    max-width: 100%;
    height: 60px;
    object-fit: contain;
    margin-bottom: 5px;
}

.promo-product p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

@media (max-width: 992px) {
    .category-sidebar {
        display: none;
    }
}